import React from 'react';
import {NavBar} from 'antd-mobile';
import {Icon} from '../../../components';
import {ToolHistory} from '../../../utils';

import './index.scss';

/**
 * 布局头部
 */
export default class Header extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    return (
      <NavBar icon={<Icon type="left" />} onLeftClick={() => window.history.back()}>
        <a onClick={() => ToolHistory.href('/')}>ReactH5</a>
      </NavBar>
    );
  }
}
